//
//  CommonTools.swift
//  WBWeiBo
//
//  Created by 王斌 on 16/7/10.
//  Copyright © 2016年 王斌. All rights reserved.
//

import UIKit

//  切换根视图控制器通知名
let SwitchRootVCNotification = "SwitchRootVCNotification"


//  当前屏幕的宽度
let ScreeWidth = UIScreen.mainScreen().bounds.size.width

//  当前屏幕的高度
let ScreeHeight = UIScreen.mainScreen().bounds.size.height


// 点击表情按钮发送的通知名
let DidSeletedEmotionButtonNotification = "DidSeletedEmotionButtonNotification"

// 删除表情按钮点击发送的通知名
let DidSelecteDeleteEmoticonButtonNotification = "DidSelecteDeleteEmoticonButtonNotification"




//  抽取一个RGB函数
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
    
    return UIColor(red: red, green: green, blue: blue, alpha: 1)
}
//  产生随机颜色
func RandomColor() -> UIColor {
    
    // 获取随机产生的色值
    let red = random() % 256
    let green = random() % 256
    let blue = random() % 256
    return RGB(CGFloat(red) / 255, green: CGFloat(green) / 255, blue: CGFloat(blue) / 255)
}



//   如果函数参数提供默认值,则可以省略不传入这个参数
func printLog(file:String = __FILE__,funcName:String = __FUNCTION__,LINE:Int = __LINE__){
    
    #if DEBUG
        print("\((file as NSString).lastPathComponent)[\(line)], \(funcName)")
        
        
    #endif
}
